<?php
// this page deletes a dealer.

require_once($_SERVER['DOCUMENT_ROOT'].'/includes/site_defaults.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/database/db.php');

if (!isset($_SESSION)) {
	session_start();
}

if (isset($_GET['id']) && $_GET['id'] > 0) {
	$d_stmt = "DELETE FROM dealerships WHERE id = ".$_GET['id'];
	echo $d_stmt;
	mysql_select_db($db_name, $db) or die(mysql_error());
	$result1 = mysql_query($d_stmt);
	echo "Dealership deleted.";
} else {
	echo "There was a problem.";
}




?>